<?php

declare(strict_types=1);

namespace Modules\Production\Models;

use Catch\Base\CatchModel as Model;

/**
 * @property $id
 * @property $process_id
 * @property $process_name
 * @property $process_code
 * @property $report_qty
 * @property $people
 * @property $hours
 * @property $creator_id
 * @property $created_at
 * @property $updated_at
 * @property $deleted_at
*/
class ProductionProcessDetail extends Model
{


    protected $table = 'production_process_detail';

    protected $fillable = [ 'id', 'process_id', 'process_name', 'process_code', 'report_qty', 'people', 'hours','total_hours','is_report', 'creator_id', 'created_at', 'updated_at','deletor_id', 'deleted_at' ];

    /**
     * @var array
     */
    protected array $fields = ['id','process_id','process_name','process_code','report_qty','people','hours','total_hours','is_report','created_at','updated_at','deletor_id'];

    /**
     * @var array
     */
    protected array $form = ['id','process_id','process_name','process_code','report_qty','people','hours','total_hours','is_report','created_at','updated_at','deletor_id'];

    /**
     * @var array
     */
    public array $searchable = [
        'process_id' => '=',
'process_code' => '=',
    ];

    /**
     * 时间格式化
     * @param $date
     * @return mixed
     */
    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i');
    }


}
